﻿using System;
using System.Collections.Generic;
using System.Text;
using Model;
using System.Net.Sockets;
using GameHelp;

namespace helper
{


    /// <summary>
    /// 角色，客户端连接，服务端连接映射
    /// </summary>
    public class ConnectionMap
    {
        Characters character;
        TcpClient gameServerConnection;
        TcpClient gameClientConnection;
        Operationer operationer;
        Account account;
        
        public ConnectionMap()
        {
        }

        /// <summary>
        /// 获取或设置账户
        /// </summary>
        public Account Account
        {
            get { return account; }
            set { account = value; }
        }

        /// <summary>
        /// 获取操作器
        /// </summary>
        public Operationer Operationer
        {
            get { return operationer; }
            set { operationer = value; }
        }

        /// <summary>
        /// 获取角色
        /// </summary>
        public Characters Character
        {
            get { return account.Character; }
            set { account.Character = value; }
        }

        /// <summary>
        /// 获取到客户端的连接
        /// </summary>
        public TcpClient GameClientConnection
        {
            get { return gameClientConnection; }
            set { gameClientConnection = value; }
        }

        /// <summary>
        /// 获取到服务端的连接
        /// </summary>
        public TcpClient GameServerConnection
        {
            get { return gameServerConnection; }
            set { gameServerConnection = value; }
        }
    }
}
